<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
        1.在普通函数中能调用静态方法
        2.在静态方法中不能调用普通方法
        */
        class Person{
            constructor(name,age){
                this.name = name
                this.age = age
            }
            sayAge(){
                sayName()
                console.log(this.age);
            }
            static sayName(){
                // this.sayAge()
                console.log("name");
            }
        }
        var p = new Person("name",18)
        Person.sayName()
</script>
</body>
</html>